﻿using System.Collections.Generic;
using System.Linq;

namespace Inscriptionem.Areas.Inscriptionem.Models.Views
{
    public class TagSearchCollectionViewModel
    {
        public IEnumerable<ORM.Tag> Tags { get; protected set; }

        public TagSearchCollectionViewModel()
        {
            Tags = new ORM.DB().Tags.Where(t => t.Name.ToLower().Contains(Text)).OrderBy(t => t.ID);
        }

        public string Text { get; set; }
        public int Page { get; set; }
    }
}